import { LoadingBaseImpl } from "./LoadingBaseImpl";

export class LoadingUniImpl extends LoadingBaseImpl {

    private count:number = 0

	show(option) {
		super.show(option)
		this.count++
		if(this.count == 1){
			uni.showLoading({
				title: '加载中',
				mask: true
			});
		}
		return this.count
		
	}
	hidden(option) {
		super.show(option)
		this.count--
		if(this.count == 0){
			uni.hideLoading()
		}
		return this.count
	}
}